#include <stdio.h>
#include <math.h>

double r, r1, r2, r3;
int test;
double x;
double base;
double area;

int main() {
	test=0;
	while (1) {
		scanf("%lf %lf %lf %lf", &r, &r1, &r2, &r3);
		test++;

		if (r==-1 && r1==-1 && r2==-1 && r3==-1) break;

		x = (r1*r+r1*r1)/(r-r1);
		base = sqrt((r+r1+x)*(r+r1+x) - r*r);

		area=base*r;		
		
		x = (r2*r+r2*r2)/(r-r2);
		base = sqrt((r+r2+x)*(r+r2+x) - r*r);

		area+=base*r;

		x = (r3*r+r3*r3)/(r-r3);
		base = sqrt((r+r3+x)*(r+r3+x) - r*r);

		area+=base*r;

		printf("Case %d: %.2lf\n", test, area);
	}

	return 0;
}
